import request from '@/utils/request'

// 查询重大隐患自查清单列表
export function listInspection(query) {
  return request({
    url: '/risk/inspection/list',
    method: 'get',
    params: query
  })
}

// 查询重大隐患自查清单详细
export function getInspection(id) {
  return request({
    url: '/risk/inspection/' + id,
    method: 'get'
  })
}

// 新增重大隐患自查清单
export function addInspection(data) {
  return request({
    url: '/risk/inspection',
    method: 'post',
    data: data
  })
}

// 修改重大隐患自查清单
export function updateInspection(data) {
  return request({
    url: '/risk/inspection',
    method: 'put',
    data: data
  })
}

// 删除重大隐患自查清单
export function delInspection(id) {
  return request({
    url: '/risk/inspection/' + id,
    method: 'delete'
  })
}

export function optionselect() {
  return request({
    url: '/risk/file/optionselect',
    method: 'get'
  })
}

export function overtimeControl() {
  return request({
    url: '/risk/inspection/overtime',
    method: 'get'
  })
}

export function listStaticInspection(query) {
  return request({
    url: '/risk/inspection/staticList',
    method: 'get',
    params: query
  })
}

export function addAllInspection(data) {
  return request({
    url: '/risk/inspection/all',
    method: 'post',
    data: data
  })
}

export function delInspections(data) {
  return request({
    url: '/risk/inspection/del',
    method: 'post',
    data: data
  })
}
